<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <script>
        // function box(obj) {
        //     obj.name = 'zs';
        //     var obj = new Object();
        //     obj.name = 'ls';
        // }
        // var obj = new Object();
        // box(obj);
        // console.log(obj.name);
        //zs

        var A = function () {
        };
        A.prototype.n = 1;
        var b = new A();
        A.prototype = {
            n: 2,
            m: 3
        };
        var c = new A();
        console.log(b.n);// n =1
        console.log(b.m);//undefined
        console.log(c.n);//2
        console.log(c.m);//3
    </script>
</body>

</html>